Skip to content

Updated pod response, grouped the parameters: "startip, endip, vlanid, forsystemvms" as ip range response and added to ipranges parameter.#5424

Merged
yadvr merged 1 commit into
apache:mainfrom
shapeblue:pod-response-changes
Sep 15, 2021
Merged

Updated pod response, grouped the parameters: "startip, endip, vlanid, forsystemvms" as ip range response and added to ipranges parameter.#5424
yadvr merged 1 commit into
apache:mainfrom
shapeblue:pod-response-changes

Conversation

@sureshanaparti

@sureshanaparti sureshanaparti commented Sep 9, 2021

Copy link
Copy Markdown
Contributor

Description

This PR updates the pod response, grouped the parameters: startip, endip, vlanid, forsystemvms as ip range response and added to ipranges parameter (a new parameter to hold the list of IP range details).

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Pod_IpRanges

How Has This Been Tested?

Manually tested the updated API response.

Before changes:

(cloudcmk) > list pods
{
  "count": 1,
  "pod": [
    {
      "allocationstate": "Enabled",
      "endip": [
        "10.0.36.60",
        "10.0.36.69"
      ],
      "forsystemvms": [
        "0",
        "1"
      ],
      "gateway": "10.0.32.1",
      "hasannotations": false,
      "id": "43ffd982-8942-4c9a-88f3-002dc7f5d411",
      "name": "Pod1",
      "netmask": "255.255.240.0",
      "startip": [
        "10.0.36.41",
        "10.0.36.67"
      ],
      "vlanid": [
        "vlan://untagged",
        "vlan://untagged"
      ],
      "zoneid": "be8e7d3e-2f57-433d-9c93-208949e2ec1d",
      "zonename": "ref-trl-1773-k-M7-suresh-anaparti"
    }
  ]
}

After changes: New parameter ipranges holds the list of ip ranges. Old parameters would be deprecated (kept for backward compatibility).

(cloudcmk) > list pods
{
  "count": 1,
  "pod": [
    {
      "allocationstate": "Enabled",
      "endip": [
        "10.0.36.60",
        "10.0.36.69"
      ],
      "forsystemvms": [
        "0",
        "1"
      ],
      "gateway": "10.0.32.1",
      "hasannotations": false,
      "id": "43ffd982-8942-4c9a-88f3-002dc7f5d411",
      "ipranges": [
        {
          "endip": "10.0.36.60",
          "forsystemvms": "0",
          "startip": "10.0.36.41",
          "vlanid": "vlan://untagged"
        },
        {
          "endip": "10.0.36.69",
          "forsystemvms": "1",
          "startip": "10.0.36.67",
          "vlanid": "vlan://untagged"
        }
      ],
      "name": "Pod1",
      "netmask": "255.255.240.0",
      "startip": [
        "10.0.36.41",
        "10.0.36.67"
      ],
      "vlanid": [
        "vlan://untagged",
        "vlan://untagged"
      ],
      "zoneid": "be8e7d3e-2f57-433d-9c93-208949e2ec1d",
      "zonename": "ref-trl-1773-k-M7-suresh-anaparti"
    }
  ]
}

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@sureshanaparti sureshanaparti added this to the 4.16.0.0 milestone Sep 9, 2021
@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@shwstppr shwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this helps to address the original issue (API automation breaking). Moreover, this further complicates it by again changing the listPods API response.
In my opinion, we should also update the description for the startip and endip params of the response, stating that they will return lists (and not a single IP)

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

I'm not sure if this helps to address the original issue. Moreover, this further complicates it by again changing the listPods API response.
In my opinion, we can just update the description for the startip and endip params of the response, stating that they will return lists (and not a single IP)

@shwstppr I think, It is better to keep the parameters "startip, endip, vlanid, forsystemvms" as a group, instead maintaining as separate lists and relating these by the list index.

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

I'm not sure if this helps to address the original issue. Moreover, this further complicates it by again changing the listPods API response.
In my opinion, we can just update the description for the startip and endip params of the response, stating that they will return lists (and not a single IP)

The original issue doesn't make sense as the Pod can hold multiple ip ranges, and I'm (-1) with changing the description. The response then doesn't maintain proper relation between the range parameters, instead these have changed to List from String (I feel, that is not the correct way).

@shwstppr

shwstppr commented Sep 9, 2021

Copy link
Copy Markdown
Contributor

@sureshanaparti I'm okay with whatever others decide or the correct way is but if the original issue doesn't make sense as you said then this PR should say that it fixes the issue.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1193

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@sureshanaparti sureshanaparti changed the title Updated pod response, moved the parameters: "startip, endip, vlanid, forsystemvms" to ipranges. Updated pod response, grouped the parameters: "startip, endip, vlanid, forsystemvms" as ip range and added to ipranges parameter. Sep 9, 2021
@sureshanaparti sureshanaparti changed the title Updated pod response, grouped the parameters: "startip, endip, vlanid, forsystemvms" as ip range and added to ipranges parameter. Updated pod response, grouped the parameters: "startip, endip, vlanid, forsystemvms" as ip range response and added to ipranges parameter. Sep 9, 2021
@resmo

resmo commented Sep 9, 2021

Copy link
Copy Markdown
Member

LGTM, the api response is much clearer now and much easier to adjust on client side.

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-1997)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33081 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5424-t1997-kvm-centos7.zip
Smoke tests completed. 89 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr

yadvr commented Sep 13, 2021

Copy link
Copy Markdown
Member

@sureshanaparti pl fix conflicts

@nvazquez nvazquez linked an issue Sep 13, 2021 that may be closed by this pull request
@yadvr

yadvr commented Sep 14, 2021

Copy link
Copy Markdown
Member

@sureshanaparti pl fix conflicts

@nvazquez nvazquez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, I'm for removing the deprecated fields on the API response but understand is kept for backward compatibility

…orsystemvms to ipranges (new parameter to hold the list of IP range details).
@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1241

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-2039)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39205 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5424-t2039-kvm-centos7.zip
Smoke tests completed. 89 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@nvazquez

Copy link
Copy Markdown
Contributor

@shwstppr @rhtyd @weizhouapache can you review this one?

@yadvr

yadvr commented Sep 15, 2021

Copy link
Copy Markdown
Member

Sure, I'll start but this may need some manual testing too.

@DaanHoogland

Copy link
Copy Markdown
Contributor

Sure, I'll start but this may need some manual testing too.

why would this need manual testing @rhtyd , the response has been changed and can be verified in an automated test. some automated test can (and should) be updated.

@yadvr

yadvr commented Sep 15, 2021

Copy link
Copy Markdown
Member

@DaanHoogland I saw no changes or introduction of a new marvin test and given the automated tests passed, this suggests there are no specific test that consume/rely on the API response - which is why I suggested somebody to manually test the UI/API.

@yadvr

yadvr commented Sep 15, 2021

Copy link
Copy Markdown
Member

Nevermind my last comment, I saw Suresh's before and after API response change is additive - LGTM.

@yadvr yadvr merged commit 1f3f02b into apache:main Sep 15, 2021
@DaanHoogland

Copy link
Copy Markdown
Contributor

hm, my comment stands though. even trusting Suresh we need some to find how tests that use this and update them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API break in pod responses

7 participants